import java.util.Scanner;
public class ShuiXianHua {
    public static void main(String[] args){
        //Scanner input1 = new Scanner(System.in);
        //int num = input1.nextInt();
        for(int num = 100; num <1000;num++) {
            int bai = num / 100;
            int shi = num % 100 / 10;
            int ge = num % 100 % 10;
            if (Math.pow(bai, 3) + Math.pow(shi, 3) + Math.pow(ge, 3) == num) {
                System.out.println(num + "是一个水仙花数");
            } else {
                //System.out.println(num + "不是一个水仙花数");
            }
        }
    }
}
